/*
 * Copyright (C) 2018 The Asiainfo-Ability Authors
 *
 *      Licensed under the Apache License, Version 2.0 (the "License");
 *      you may not use this file except in compliance with the License.
 *      You may obtain a copy of the License at
 *
 *          http://www.apache.org/licenses/LICENSE-2.0
 *
 *      Unless required by applicable law or agreed to in writing, software
 *      distributed under the License is distributed on an "AS IS" BASIS,
 *      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *      See the License for the specific language governing permissions and
 *      limitations under the License.
 */

package org.asiainfo.ability.manager.dao;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.asiainfo.ability.gateway.model.Instance;
import org.asiainfo.ability.gateway.model.Machine;
import org.asiainfo.ability.gateway.model.MicroService;
import org.asiainfo.ability.gateway.model.UserAbility;
import org.asiainfo.ability.gateway.vo.Page;
import org.asiainfo.ability.manager.model.JarPackage;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * @Author: visen
 * @Date: 2018/1/16
 * @Description:
 */
@Mapper
@Component
public interface PackageDao {

    public List<JarPackage> listPackagesByServiceName(@Param("serviceName") String serviceName
            , @Param("page") int page,  @Param("limit") int limit);
    public JarPackage getLatestMasterPackage(String serviceName);
    public JarPackage loadPackage(long id);
    public int getPackageCount();
    public List<JarPackage> listChanged();
    public List<JarPackage> listPackages(@Param("page") int page,  @Param("limit") int limit);
    public void updatePackage(JarPackage jarPackage);
    public void commitPackage(long id);
    public void savePackage(JarPackage jarPackage);
    public void deletePackage(long id);


}
